<?php
class Test_model extends CI_Model
{

    public function __construct()
    {
        parent::__construct();
        // 加载数据库
        $this->load->database();
    }

    public function select()
    {
        $this->db->select("count(1)");
        $this->db->from("tw_lucky_cat.futures_history");
        
        $this->db->where('deleted_at', NULL);
        
        $query = $this->db->get();
        if ($query->num_rows() > 0) {
            return $query->result();
        }
        return false;
    }
}